import request from '@/utils/request'

// 查询劳动合同列表
export function listCertificate(query) {
  return request({
    url: '/back/certificate/list',
    method: 'get',
    params: query
  })
}

export function certificateList(query) {
  return request({
    url: '/back/certificate/certificateList',
    method: 'get',
    params: query
  })
}

// 查询劳动合同详细
export function getCertificate(id) {
  return request({
    url: '/back/certificate/' + id,
    method: 'get'
  })
}

// 新增劳动合同
export function addCertificate(data) {
  return request({
    url: '/back/certificate',
    method: 'post',
    data: data
  })
}

// 修改劳动合同
export function updateCertificate(data) {
  return request({
    url: '/back/certificate',
    method: 'put',
    data: data
  })
}

// 删除劳动合同
export function delCertificate(id) {
  return request({
    url: '/back/certificate/' + id,
    method: 'delete'
  })
}
